package com.nengchuan.eic.nceconomy.constant;

import java.util.stream.Stream;

/**
 * 功能描述:
 *
 * @Author: liruui
 * @Date: 2020/3/25 0025 下午 4:12
 */

public enum SheetEnum {

    SHEET1("变电总算表（表一甲）", "importance",""),
    SHEET2_YI("建筑部分汇总表（表二乙）", "importance",""),
    SHEET2_JIA("安装部分汇总表（表二甲）", "importance",""),
    SHEET3_YI("建筑单位工程汇总表（表三乙）", "importance",""),
    SHEET3_JIA("安装单位工程汇总表（表三甲）", "importance",""),
    SHEET4("其他费用表（表四）", "importance",""),
    SHEET5_YI("技术指标表（表五乙）", "importance",""),
    SHEET7("建设场地征用及清理费用表（表七）", "importance",""),
    SHEET8("建筑甲供主材汇总表", "minor","red"),
    SHEET9("建筑乙供主材汇总表", "minor","red"),
    SHEET10("安装甲供主材汇总表", "minor","blue"),
    SHEET11("安装乙供主材汇总表", "minor","blue"),
    SHEET12("建筑甲供主材价差汇总表", "minor","red"),
    SHEET13("建筑乙供主材价差汇总表", "minor","red"),
    SHEET14("安装甲供主材价差汇总表", "minor","blue"),
    SHEET15("安装乙供主材价差汇总表", "minor","blue"),
    SHEET16("建筑甲供设备汇总表", "minor","red"),
    SHEET17("建筑乙供设备汇总表", "minor","red"),
    SHEET18("安装甲供设备汇总表", "minor","blue"),
    SHEET19("安装乙供设备汇总表", "minor","blue"),
    NULL("", "other", "");

    String name;
    String category;
    String colour;

    SheetEnum(String name, String category, String colour) {
        this.colour = colour;
        this.category = category;
        this.name = name;
    }

    public String getName() {
        return name;
    }
    public String getCategory() {
        return category;
    }
    public String getColour() {
        return colour;
    }

    public  static  String getCategroyBName(String name){
       return Stream.of(SheetEnum.values()).filter(x->x.getName().equals(name)).findFirst().orElse(SheetEnum.NULL).getCategory();
    }
    public  static  String getColourBName(String name){
        return Stream.of(SheetEnum.values()).filter(x->x.getName().equals(name)).findFirst().orElse(SheetEnum.NULL).getColour();
    }
    public  static  boolean isExist(String name){
        return Stream.of(SheetEnum.values()).filter(x->x.getName().equals(name)).findFirst().isPresent();
    }

}
